<template>
  <div>
    Bar age: {{ age }}

    10 年后的年龄:{{ tenYearsOldAge }}
    {{ user }}
  </div>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  data() {
    return {
      age: this.$store.state.age,
    };
  },
  computed: {
    ...mapGetters(["tenYearsOldAge"]),
    user() {
      return this.$store.getters.getUserByAge(17);
    },
  },
  mounted() {
    console.log(this.$store);
  },
};
</script>

<style></style>
